<template>
	<view class="detail">
		<view class="detail_list" v-for="(item,index) in active_info" v-if="active_info">
			<view class="detail_list_left">
				<image :src="item.Avatar" mode=""></image>
				<span>{{item.MemberName}}</span>
				<i class="icon" v-html="item.icon"></i>
			</view>
			<view class="detail_list_right">
				<view class="pass">已签到</view>
			</view>
		</view>
		<view class="nodata" v-if="flag">
			<image src="https://ykp-new.oss-cn-hangzhou.aliyuncs.com/client/index/nodata.png" mode=""></image>
			<view class="nodata_item">
				暂无数据
			</view>
		</view>
		<!-- loading 遮罩层 -->
		<loading v-if="loadflag"></loading>
		<navigation></navigation>
	</view>
</template>

<script>
	import navigation from '@/components/navigation/navigation.vue';
	export default {
		components: {
			navigation
		},
		data () {	
			return {
				active_id:'',
				active_info:[],
				flag:false,
				loadflag: true,
			}
		},
		onLoad(options) {
			//  // console.log (options)
			this.active_id = options.active_id
			//  // console.log (this.active_id)
		},
		mounted() {
			this.getInfo()
		},
		methods:{
			getInfo () {
				this.ajax('active/activeSign', {
					data:{
						active_id:this.active_id
					},
					success: res => {
						 // console.log (res)
						this.loadflag = false;
							res.msg.data.forEach( (item) => {
								item.Avatar = item.Avatar.replace("http:","https:")
								if(item.checked) {
									this.active_info = this.active_info.concat(item)
								}
							})
							if(!this.active_info.length) {
								this.flag = true
							}
						//  // console.log (this.active_info)
					}
				})
			}
		}
	}
</script>

<style lang="less" scoped>
  @import url("../../static/less/pageA/competiondetail/activeprocess.less");
</style>
